package com.muqi.app.qlearn.student.org;

import java.util.ArrayList;
import java.util.List;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;


import com.muqi.app.qlearn.modles.CreditBean;
import com.muqi.app.qlearn.student.R;

/**
 * Created by lizhanfeng on 2016/6/2.
 */
public class CommentFragment extends ScrollAbleFragment {
    private ListView mListview;
    
    private List<CreditBean> creditLists = new ArrayList<CreditBean>();
    
    
    public static CommentFragment newInstance(List<CreditBean> creditLists) {
        CommentFragment commentFragment = new CommentFragment();
        commentFragment.setData(creditLists);
        return commentFragment;
    }

    private void setData(List<CreditBean> creditLists){
    	this.creditLists = creditLists;
    }
    
   
    
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_list_comment, container, false);
        mListview = (ListView) view.findViewById(R.id.listview);
        
//        mListview.setAdapter(new GroupTeacherCourseItemAdapter(getActivity(), mCourseList, CommentFragment.this, mOneToOneItemNum, mClassItemNum));
        mListview.setAdapter(new CreditAdapter(getActivity(),creditLists));
        
        return view;
    }



    @Override
    public View getScrollableView() {
        return mListview;
    }
}
